"--------------------------------------------------------------------------
" $Source: /Users/pgurumur/temp/andromeda/repos/hg/confs/proto.vim $ file, by Prabhu
"
" $Id: proto.vim 18310feb2227 2012/08/25 23:28:50 pgurumur $
" Copyright (c) 2009 Prabhu Gurumurthy  <pgurumur@gmail.com>
" 
" Permission to use, copy, modify, and distribute this software for any
" purpose with or without fee is hereby granted, provided that the above
" copyright notice and this permission notice appear in all copies.
"
" THE SOFTWARE IS PROVIDED 'AS IS' AND THE AUTHOR DISCLAIMS ALL WARRANTIES
" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
"
" __version__  = $Revision: 18310feb2227 $
" __author__   = $Author: pgurumur $
" __modified__ = $Date: 2012-08-25 23:28:50Z $
"
"---------------------------------------------------------------------------
 
if version < 600 
   syntax clear 
elseif exists("b:current_syntax") 
   finish
endif

syn keyword protoStatement    package option message
syn keyword protoStatement    required enum repeated
syn keyword protoStatement    optional default extend
syn keyword protoStatement    int32 int64 double float
syn keyword protoStatement    uint32 uint64 sint32 sint64
syn keyword protoStatement    fixed32 fixed64 sfixed64
syn keyword protoStatement    bool bytes extensions to 
syn keyword protoStatement    option service true false
syn keyword protoStatement    packed deprecated import
syn keyword protoTodo         TODO FIXME XXX contained
syn match protoComment     "//.*$" display contains=protoTodo
syn match protoNumber      "\<\d\>" display
syn match protoNumber      "\<[1-9]\d\+\>" display
syn match protoNumber      "\<\d\+[jJ]\>" display
syn match protoNumberError "\<0\d\+\>" display
syn match protoFloat       "\.\d\+\%([eE][+-]\=\d\+\)\=[jJ]\=\>" display
syn region protoString     start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$'
syn region protoParen      transparent start='{' end='}'

hi link protoStatement     Statement
hi link protoComment       Comment
hi link protoNumber        Number
hi link protoString        String
hi link protoFloat         Float
hi link protoTodo          Todo

let b:current_syntax = "proto"
